package com.gaopeng.qingge.web.admin;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

@Controller
@RequestMapping("/admin")
public class AdminController {
	@RequestMapping(value="/index", method=RequestMethod.GET)
	public String index() {
		return "admin/index";
	}
	/**
	 * 内容管理页面的路由
	 * @param 页面内卡片切换
	 * @param 类型参数
	 * @return
	 */
	@RequestMapping(value="/blog/{type}",method=RequestMethod.GET)
	public String blog(@PathVariable String type,Map<String, Boolean> model){
		model.put(type, true);
		return "admin/blog";
	}
	
	@RequestMapping(value="/system",method=RequestMethod.GET)
	public String system() {
		return "admin/system";
	}
	@RequestMapping(value="/theme",method=RequestMethod.GET)
	public String theme() {
		return "admin/theme";
	}
	@RequestMapping(value="/user",method=RequestMethod.GET)
	public String user(Map<String, Object> model) {
		return "admin/user";
	}
	@RequestMapping(value="/pm",method=RequestMethod.GET)
	public String pm() {
		return "admin/pm";
	}
}
